from rest_framework import serializers as serializers_mysql

from api.models import Material,  Package, Pose, Animate,  \
    Requirement, Member, MemberLevel, MemberLevel2Material, BackUser, \
    UserToken, BackRole, MaterialSubType, Gallery, VoiceTone, \
    RecordTts, RecordVideo, GoodsComposeSave, LiveBroadcastSave


class GoodsComposeSaveSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = GoodsComposeSave
        fields = '__all__'


class LiveBroadcastSaveSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = LiveBroadcastSave
        fields = '__all__'


class MaterialSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Material
        fields = '__all__'


class RecordTtsSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = RecordTts
        fields = '__all__'


class RecordVideoSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = RecordVideo
        fields = '__all__'


class PoseSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Pose
        fields = '__all__'


class AnimateSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Animate
        fields = '__all__'


class PackageSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Package
        fields = '__all__'


class BackUserSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = BackUser
        exclude = ('passwd',)


class BackRoleSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = BackRole
        fields = '__all__'


class MemberSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Member
        exclude = ('passwd',)


class MemberLevelSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = MemberLevel
        fields = '__all__'


class MemberLevel2MaterialSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = MemberLevel2Material
        fields = '__all__'


class RequirementSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Requirement
        fields = '__all__'


class UserTokenSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = UserToken
        fields = '__all__'


class MaterialSubTypeSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = MaterialSubType
        fields = '__all__'


class GallerySerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = Gallery
        fields = '__all__'


class VoiceToneSerializer(serializers_mysql.ModelSerializer):
    class Meta:
        model = VoiceTone
        fields = '__all__'

